<!--
var destField, destNameField, destShowField;

//open Modal window
function MM_openModalWindowCF(theURL, inWidth, inHeight) 
{ 
  var features = "dialogWidth:" + inWidth + "px;dialogHeight:" + inHeight + "px;scrollbars:yes;status:no;help:no;center:yes";
  window.showModalDialog(theURL, window, features);
}

function selectContentType(inDestField, inDestShowField, moduleName)
{
  destField = inDestField;
  destShowField = inDestShowField;
  MM_openModalWindowCF('../select/selectContentType.jsp?moduleName=' + moduleName, 640, 480);
}

function changeContentType(name, value)
{
	document.all(destField).value = name;
	document.all(destShowField).value = value;
}

function selectLoginName(inDestField)
{
  destField = inDestField;
  MM_openModalWindowCF('../select/selectLoginName.jsp', 640, 480);
}

//*tap system* select user from tap_profile
function selectTapProfile(inDestField)
{
  destField = inDestField;
  MM_openModalWindowCF('../../tap/listAdmin/tap_profile_select.jsp', 750, 550);
}

function changeLoginName(name)
{
	document.all(destField).value = name;
}

function selectUserName(inDestField, baseDir)
{
  destField = inDestField;
  var showWidth = 660;
  if(screen.availWidth < 660)showWidth = screen.availWidth;
  if(baseDir)MM_openModalWindowCF(baseDir + '/select/selectUserName.jsp', showWidth, 480);
  else MM_openModalWindowCF('../select/selectUserName.jsp', showWidth, 480);
}

function changeUserName(name)
{
  document.all(destField).value = name;
}

function updateImage(infoStamp, inDestField, inDestImg, appContext, baseUrl) 
{
  var arr = showModalDialog(appContext + "/systemBase/edit/uploadImage.jsp?infoStamp=" + infoStamp, "", "dialogHeight:20;dialogWidth:29;help:no;edge:raised;resizable:no;status:no;font-family:Verdana; font-size:12;");
  if(arr != null)
  {
	if(document.all(inDestField))document.all(inDestField).value = arr;
	document.all(inDestImg).src = baseUrl + arr;
  }	
}

function updateFile(infoStamp, inDestField, appContext) 
{
  var arr = showModalDialog(appContext + "/systemBase/edit/uploadFile.jsp?infoStamp=" + infoStamp, "", "dialogHeight:20;dialogWidth:29;help:no;edge:raised;resizable:no;status:no;font-family:Verdana; font-size:12;");
  if(arr != null)
  {
	if(document.all(inDestField))document.all(inDestField).value = arr;
  }	
}

function selectMultiUserName(inDestField, inOldValue, baseDir)
{
  destField = inDestField;
  var showWidth = 660;
  if(screen.availWidth < 660)showWidth = screen.availWidth;
  if(baseDir)MM_openModalWindowCF(baseDir + '/select/selectMultiUserName.jsp?oldValue=' + inOldValue, showWidth, 480);
  else MM_openModalWindowCF('../select/selectMultiUserName.jsp?oldValue=' + inOldValue, showWidth, 480);
}

function changeMultiName(name, isChecked)
{
  var value = name;
  var valueStr = document.all(destField).value;
  var tIndex = valueStr.indexOf(value);
  if(isChecked)
  {
     if(tIndex < 0)
     {
       valueStr = valueStr + "," + value;	  
     }  
  } 
  else
  {
     if(tIndex >=0 )
     {
       if(tIndex > 0)tIndex--;
     }
     valueStr = valueStr.substring(0, tIndex) + valueStr.substring(tIndex + value.length + 1);
  } 
  tIndex = valueStr.indexOf(",");
  if(tIndex == 0)
  {
    valueStr = valueStr.substring(1);
  }
  document.all(destField).value = valueStr;
}

function selectMultiGroup(inDestField, inOldValue)
{
  destField = inDestField;
  MM_openModalWindowCF('../select/selectMultiGroup.jsp?oldValue=' + inOldValue, 640, 480);
}

function selectMultiUserOrDepart(inDestField, inOldValue, baseDir)
{
  destField = inDestField;
  var showWidth = 660;
  if(screen.availWidth < 660)showWidth = screen.availWidth;
  if(baseDir)MM_openModalWindowCF(baseDir + '/select/selectMultiUserOrDepart.jsp?oldValue=' + inOldValue, showWidth, 520);
  else MM_openModalWindowCF('../select/selectMultiUserOrDepart.jsp?oldValue=' + inOldValue, showWidth, 520);
}

function selectMultiUserDepartOrGroup(inDestField, inOldValue, baseDir)
{
  destField = inDestField;
  var showWidth = 660;
  if(screen.availWidth < 660)showWidth = screen.availWidth;
  if(baseDir)MM_openModalWindowCF(baseDir + '/select/selectMultiUserDepartOrGroup.jsp?oldValue=' + inOldValue, showWidth, 520);
  else MM_openModalWindowCF('../select/selectMultiUserDepartOrGroup.jsp?oldValue=' + inOldValue, showWidth, 520);
}

function selectMultiDepart(inDestField, inOldValue)
{
  destField = inDestField;
  MM_openModalWindowCF('../select/selectMultiDepart.jsp?oldValue=' + inOldValue, 640, 480);
}

function selectMultiUserDepartOrGroupExt(inDestField, inOldValue)
{
  destField = inDestField;
  var showWidth = 660;
  if(screen.availWidth < 660)showWidth = screen.availWidth;
  MM_openModalWindowCF('../select/selectMultiUserDepartOrGroupExt.jsp?oldValue=' + inOldValue, showWidth, 520);
}

function setListValue(optList, optValue) 
{ 
  if(optList.options.length > 0)
  {
  	for(var i=0; i<optList.options.length; i++)
  	{
  		if(optList.options[i].value == optValue)
  		{
  	      optList.selectedIndex = i;		 
  		  break;	
  		}
  	}  	
  }
} 

function setRadioValue(radioName, radioValue) 
{ 
    for(var i=0; i<document.ContentEditForm.elements.length; i++)
    {
      var e = document.ContentEditForm.elements[i];
      if(e.type == 'radio' && e.name == radioName && e.value == radioValue)e.click();
    }
} 
//-->

